package net.hn.hnms.biz.safety.water.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.biz.api.safety.location.model.IndicatorVo;
import net.hn.hnms.biz.api.safety.water.model.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 智呈物联 pan'sx
 * 2022/7/26 16:24
 * 1.0 version
 */
@RestController
@RequestMapping("/riskMonitor/subsidence")
@Api(value = "地表沉陷控制器", tags = {"地表沉陷"})
public class RiskMonitorSubsidenceController {

    @GetMapping("table")
    @ApiOperation("监测信息")
    public R<SubsidenceInfoVo> monitorInfo() {
        //todo
        return R.ok(new SubsidenceInfoVo());
    }

    @GetMapping("stateTrend")
    @ApiOperation("状态占比趋势")
    public R<StateTrendVo> stateTrend() {
        //todo
        return R.ok(new StateTrendVo());
    }

    @GetMapping("realTime")
    @ApiOperation("实时数据")
    public R<List<SubsidenceDataVo>> realTime() {
        //todo
        return R.ok(new ArrayList<>());
    }

    @GetMapping("analysis")
    @ApiOperation("数据分析")
    public R<SubsidenceAnalysisVo> analysis(SubsidenceAnalysisDto analysisDto) {
        //todo
        return R.ok(new SubsidenceAnalysisVo());
    }

    @GetMapping("singleAnalysis")
    @ApiOperation("单个基站数据分析")
    public R<SubsidenceAnalysisVo> singleAnalysis(@ApiParam(value = "开始日期，默认结束日期前推一周7天") String beginDay,
                                                  @ApiParam(value = "结束日期，默认今天") String endDay,
                                                  @ApiParam(value = "设备id", required = true) @RequestParam(required = true) String deviceId
    ) {
        //todo
        return R.ok(new SubsidenceAnalysisVo());
    }

    @GetMapping("indicator")
    @ApiOperation("重要指标")
    public R<IndicatorVo> indicator() {
        //todo
        return R.ok(new IndicatorVo());
    }
}
